//
// Created by wwl on 2021/12/23.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "header.h"
void shiyan_031(){
    int i, j,n,m;
    char strArr[n];
    //输入元素的个数以及元素
    scanf("%d", &n);
    int (*p)[n] = NULL;
    scanf("%s", strArr);
    m = max(&n);
    //动态开辟空间
    p = (int (*)[n]) malloc(sizeof(int) * n * m);
    p = (int (*)[n]) convertDecimalToBinary(m, n, p);
    for (i = 0; i < m; ++i) {
        printf("{");
        for (j = 0; j < n; ++j) {
            if(*(*(p + i) + j) == 1){
                printf("%c",strArr[j]);
            }
        }
        printf("} ");

    }
    printf("\n");
}
